﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LootPoints.Warcraft;

namespace LootPoints.Pages
{
    public partial class Progress : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            dynamic achievements = new BattleNet().GuildAchievements;

            List<string> acs = new List<string>();
            foreach (object item in achievements.achievements.achievementsCompleted) acs.Add(item.ToString());

            // Raid achievements
            if (acs.Contains("6668")) { img6668.ImageUrl = "~/Images/Achievements/6668-1.png"; /* Mogu'shan Vault Guild Run */ }
            if (acs.Contains("6669")) { img6669.ImageUrl = "~/Images/Achievements/6669-1.png"; /* Heart of Fear Guild Run */ }
            if (acs.Contains("6670")) { img6670.ImageUrl = "~/Images/Achievements/6670-1.png"; /* Terrace of Endless Spring Guild Run */ }
            if (acs.Contains("6708")) { img6708.ImageUrl = "~/Images/Achievements/6708-1.png"; /* Salyis's Warband Guild Run */ }
            if (acs.Contains("6709")) { img6709.ImageUrl = "~/Images/Achievements/6709-1.png"; /* Sha of Anger Guild Run */ }
            if (acs.Contains("6675")) { img6675.ImageUrl = "~/Images/Achievements/6675-1.png"; /* Heroic: Will of the Emperor Guild Run */ }
            if (acs.Contains("6677")) { img6677.ImageUrl = "~/Images/Achievements/6677-1.png"; /* Heroic: Grand Empress Shek'zeer Guild Run */ }
            if (acs.Contains("6676")) { img6676.ImageUrl = "~/Images/Achievements/6676-1.png"; /* Heroic: Sha of Fear Guild Run */ }
            
            // Dungeon Challenges
            if (acs.Contains("6921")) { img6921.ImageUrl = "~/Images/Achievements/6921-1.png"; /* Challenge Conquerors - Guild Edition */ }
        }
    }
}